<?php $form = new MailingForm(); ?>
<h1 class="heading">Visualizar Mailing</h1>

<table class="form">
	<tbody>
		<tr>
			<th colspan="2" class="title">Detalhes Mailing</th>
		</tr>
		<tr>
			<th><?php echo $form['id_mailing']->renderLabel() ?>:</th>
			<td><?php echo $mailing->getIdMailing() ?></td>
		</tr>
		<tr>
			<th><?php echo $form['nm_mailing']->renderLabel() ?>:</th>
			<td><?php echo $mailing->getNmMailing() ?></td>
		</tr>
		<tr>
			<th><?php echo $form['st_mailing']->renderLabel() ?>:</th>
			<td><?php echo ($mailing->getStMailing() == 0) ? 'Ativo' : 'Inativo'; ?></td>
		</tr>
		<tr>
			<th><?php echo $form['dt_envio']->renderLabel() ?>:</th>
			<td><?php echo $mailing->getDtEnvio() ?></td>
		</tr>
		<tr>
			<th><?php echo $form['ds_mailing']->renderLabel() ?>:</th>
			<td><?php echo $mailing->getDsMailing() ?></td>
		</tr>
		<tr>
			<th><?php echo $form['mailing_group_list']->renderLabel() ?>:</th>
			<td>
				<?php foreach($mailing['MailingGroup'] as $group): ?>
				<?php echo $group['nm_mailing_group']; ?>
				<br />
				<?php endforeach; ?>	
			</td>
		</tr>
	</tbody>
</table>

<hr />

<?php
comandos_form(
	link_to(
		':: Listar ::',
		'mailing/list',
		array('class' => 'botao')
	),
	link_to(
		':: Editar ::',
		'mailing/edit?id_mailing='.$mailing->getIdMailing(),
		array('class' => 'botao')
	)
);
?>